﻿namespace Dyao.Book.Contract.Serialization
{
    /// <summary>
    /// 标记Enum序列化时是否为字符串
    /// </summary>
    public class StringEnumAttribute : SerializeFormatterAttribute
    {
        /// <summary>
        /// 枚举序列化的值是否为string
        /// </summary>
        public bool IsStringValue { get; set; } = true;

        public StringEnumAttribute() { }

        public StringEnumAttribute(bool isStringValue)
        {
            IsStringValue = isStringValue;
        }
    }
}
